package io.hepu.robotize;

public interface IConstant {
    String IMAGE_TYPE = "png";

    String IMAGE_CONTENT_TYPE = "image/png";

    // Characters
    String URL_SEPARATOR = "/";
    String UNDERLINE = "_";
    String HYPHEN = "-";
    String COLON = ":";
    String COMMA = ",";
    String DOT = ".";

    // Time units
    int SECOND = 1000;
    int MINUTE = 60 * SECOND;
    int HOUR = 60 * MINUTE;
    int DAY = 24 * HOUR;

    String TIMEZONE = "GMT+8";
    String DATEFORMAT = "yyyy-MM-dd HH:mm:ss";

    // 默认字符编码
    String CHARSET_UTF8 = "UTF-8";

    String APPLICATION_JSON = "application/json";

    /**********************
     * SHIRO和CACHE
     *********************/
    // 加密之盐
    String SALT = "!(**)#)#";
    // 加密算法
    String HASH_ALGORITHMNAME = "MD5";
    // 加密次数
    int HASH_ITERATIONS = 3;

    // Shiro缓存过期时间(单位秒)：15d
    int SHIRO_CACHE_EXPIRATION = 15 * 24 * 60 * 60;

    // Shiro权限缓存前缀
    String SHIRO_CACHE_PREFIX = "SHIRO:CACHE:";

    String ID_CACHE_PREFIX = "ID:CACHE:";

    /**********************
     * JWT和AUTHORIZATION
     *********************/
    // JWT Token缓存过期时间(单位秒)：180d
    int JWT_ACCESS_TOKEN_EXPIRATION = 180 * 24 * 60 * 60;

    // JWT Token刷新过期时间(单位秒)：200d
    int JWT_REFRESH_TOKEN_EXPIRATION = 200 * 24 * 60 * 60;

    // JWT Token缓存前缀
    String JWT_ACCESS_TOKEN_PREFIX = "JWT:ACCESS_TOKEN:";

    // JWT Token刷新前缀
    String JWT_REFRESH_TOKEN_PREFIX = "JWT:REFRESH_TOKEN:";

    // JWT Token加密字符串
    String JWT_ENCRYPT_KEY = "bGlvbkByZWNydWl0QGp3dA==";

    // 请求头：认证TOKEN
    String AUTHORIZATION_HEADER = "Authorization";

    // 请求头：认证平台
    String AUTHORIZATION_PLATFORM = "Platform";

    // 认证类型Claim标识
    String CLAIM_AUTH_TYPE = "AUTH_TYPE";

    String CLAIM_SIGNING_AT = "SIGNING_AT";

    // 认证平台Claim标识
    String CLAIM_AUTH_PLATFORM = "AUTH_PLATFORM";

    // HTTP 请求属性KEY
    String REQ_KEY_SUBJECT = "USER_ID";
    String REQ_KEY_PRINCIPAL = "USER";

    /**********************
     * WebSocket
     *********************/
    // 离线消息接收
    String MSG_RECV_OFFLINE = "recv_offline_message";

    // 历史消息接收
    String MSG_RECV_HISTORY = "recv_history_message";

    // 历史消息发送
    String MSG_SEND_HISTORY = "send_history_message";

    /**********************
     * 公众号与小程序
     *********************/
    // 微信验证token
    String WX_VERIFY_TOKEN = "Junma";

    /**
     * 微信token获取地址
     */
    String WX_TOKEN_URL = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=APPID&secret=APPSECRET";

    /**
     * 微信jsapi_ticket获取地址
     */
    String WX_TICKET_URL = "https://api.weixin.qq.com/cgi-bin/ticket/getticket?access_token=ACCESS_TOKEN&type=jsapi";

    /**
     * 生成带参数的二维码
     */
    String WX_QRCODE_CREATE_URL = "https://api.weixin.qq.com/cgi-bin/qrcode/create?access_token=ACCESS_TOKEN";

    /**
     * 通过ticket换取二维码
     */
    String WX_QRCODE_SHOW_URL = "https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket=TICKET";

    /**
     * 微信客服消息发
     */
    String WX_CUSTOM_SEND_URL = "https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=ACCESS_TOKEN";

    /**
     * 微信用户基本信息
     */
    String WX_USER_INFO_URL = "https://api.weixin.qq.com/cgi-bin/user/info?access_token=ACCESS_TOKEN&openid=OPENID&lang=zh_CN";

    /**
     * 发送模板消息
     */
    String WX_TEMPLATE_PUSH_URL = "https://api.weixin.qq.com/cgi-bin/message/template/send?access_token=ACCESS_TOKEN";

    /**
     * 发送订阅消息
     */
    String WX_SUBSCRIBE_PUSH_URL = "https://api.weixin.qq.com/cgi-bin/message/subscribe/send?access_token=ACCESS_TOKEN";

    /**
     * 用户手机信息
     */
    String WX_USER_PHONE_URL = "https://api.weixin.qq.com/wxa/business/getuserphonenumber?access_token=ACCESS_TOKEN";

    /**
     * 发货信息录入
     */
    String WX_SHIPPING_UPLOAD_URL = "https://api.weixin.qq.com/wxa/sec/order/upload_shipping_info?access_token=ACCESS_TOKEN";

    /**
     * 查询快递公司
     */
    String WX_EXPRESS_URL = "https://api.weixin.qq.com/shop/delivery/get_company_list?access_token=ACCESS_TOKEN";

    /**
     * 小程序登录
     */
    String WX_CODE2SESSION_URL = "https://api.weixin.qq.com/sns/jscode2session?appid=APPID&secret=APPSECRET&js_code=JSCODE&grant_type=authorization_code";

    /**
     * 企业转账到零钱
     */
    String WX_ENT_TRANSFERS_URL = "https://api.mch.weixin.qq.com/mmpaymkttransfers/promotion/transfers";

    /**
     * 商家转账到零钱
     */
    String WX_TRANSFERS_URL = "https://api.mch.weixin.qq.com/v3/transfer/batches";

    /**
     * 查询转账批次单
     */
    String WX_TRANSFERS_QUERY_URL = "https://api.mch.weixin.qq.com/v3/transfer/batches/out-batch-no";

    /**
     * 统一下单
     */
    String WX_UNIFIED_ORDER_URL = "https://api.mch.weixin.qq.com/pay/unifiedorder";

    /**
     * 查询订单
     */
    String WX_QUERY_ORDER_URL = "https://api.mch.weixin.qq.com/pay/orderquery";

    /**
     * 撤销订单
     */
    String WX_REVERSE_ORDER_URL = "https://api.mch.weixin.qq.com/secapi/pay/reverse";

    /**
     * 关闭订单（V3）
     */
    String WX_CLOSE_ORDER_URL = "https://api.mch.weixin.qq.com/v3/pay/transactions/out-trade-no/OUT_TRADE_NO/close";

    /**
     * 申请退款
     */
    String WX_PAY_REFUND_URL = "https://api.mch.weixin.qq.com/secapi/pay/refund";

    /**
     * 付款码支付
     */
    String WX_MICRO_PAY_URL = "https://api.mch.weixin.qq.com/pay/micropay";

    /**********************
     * 阿里云OSS
     *********************/

    String OSS_CALLBAK_BODY = "bucket=${bucket}&object=${object}&size=${size}&etag=${etag}&mimeType=${mimeType}&height=${imageInfo.height}&width=${imageInfo.width}&format=${imageInfo.format}";

    String OSS_CALLBAK_BODY_TYPE = "application/x-www-form-urlencoded";

}
